import request from '@/utils/request'

export function getOrderData(id) {
  return request({
    url: '/order/createOrder',
    method: 'get',
    params: {
      id: id // 将参数添加到请求中
    }
  })
}

export function getProduct(id) {
  return request({
    url: '/order/info',
    method: 'get',
    params: {
      orderId: id // 将参数添加到请求中
    }
  })
}

export function getEditAddress(id, selectedAddressId) {
  return request({
    url: '/order/editAddress',
    method: 'get',
    params: {
      id: id,
      addressId: selectedAddressId// 将参数添加到请求中
    }
  })
}

export function getOrderList(queryParams) {
  return request({
    url: '/order/list',
    method: 'post',
    data: queryParams,
  })
}
